import React from "react";
import { HomeO, DebitPay, CartO, UserCircleO } from "@react-vant/icons";
const Car = React.lazy(() => import("../views/car"));
const Classify = React.lazy(() => import("../views/classify"));
const Home = React.lazy(() => import("../views/home"));
const My = React.lazy(() => import("../views/my"));

const Set = React.lazy(() => import("../views/set"));
const MainLayout = React.lazy(() => import("../views/mainLayout"));
const Login = React.lazy(() => import("../views/login"));
const Detail = React.lazy(() => import("../views/detail"));

export const CHILDREN_ROUTER_LIST = [
  {
    path: "/",
    element: <Home></Home>,
    title: "首页",
    icon: <HomeO />,
  },
  {
    path: "/classify",
    element: <Classify></Classify>,
    title: "分类",
    icon: <DebitPay />,
  },
  {
    path: "/car",
    element: <Car></Car>,
    title: "购物车",
    icon: <CartO />,
  },
  {
    path: "/my",
    element: <My></My>,
    title: "我的",
    icon: <UserCircleO />,
  },
];

export const ROUTER_LIST = [
  {
    path: "/",
    element: <MainLayout></MainLayout>,
    children: CHILDREN_ROUTER_LIST,
  },
  {
    path: "/set",
    element: <Set></Set>,
  },
  {
    path: "/login",
    element: <Login></Login>,
  },
  {
    path: "/detail/:id",
    element: <Detail></Detail>,
  },
];
